package cn.piesat.client.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.Thread.UncaughtExceptionHandler;

/**
 * 自定义线程异常处理
 * @author liuyang
 */
public class MyExceptionHandler implements UncaughtExceptionHandler {

	private static final Logger logger = LoggerFactory.getLogger(MyExceptionHandler.class);
	
	@Override
	public void uncaughtException(Thread t, Throwable e) {
		logger.error("---[ERROR] thread name {}, msg {}---",t.getName(),e.getMessage());
	}

}
